package com.cloud.dong.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author DJ
 * @description
 * @date 2022/2/12 9:52 下午
 **/
@RestController
@RefreshScope
public class ConfigClientController {

    @Value("${server.port}")
    private String port;

    @Value("${config.info}")
    private String info;

    @GetMapping("/config/get-info")
    public String getInfo() {
        return "server.port:" + port + "\t\n\n" + "configInfo:" + info;
    }
}
